#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <linux/fb.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <input_manager.h>

int main(int argc, char **argv)
{	
	InputEvent tEvent;
	InputDev_Register();
	InputDevice_Init();
	int DeviceSign;
	int ret;
	while(1)
	{
		ret = GetInputEvent(&tEvent);
		if(!ret)
		{
			printf("GetInputEvent err\n");
			return -1;
		}
		DeviceSign = tEvent.iType;

		
		switch (DeviceSign)
		{
			case INPUT_TYPE_TOUCH:
				printf("X       	---> %d\n" , tEvent.iX);
				printf("Y       	---> %d\n" , tEvent.iY);
				printf("Pressure	---> %d\n" , tEvent.iPressure);
				printf("Type		---> %d\n" , tEvent.iType);
				continue;
				
			case INPUT_TYPE_NET:
				printf("Type	   ---> %d\n" , tEvent.iType);
				printf("str	   	   ---> %s\n" , tEvent.str);
				continue;
		}
		
	}
	return 0;	
}


